﻿using System;
using System.IO;

namespace OpenLS.Spreadsheet.Formats.Biff.Records
{
    internal class CFExTextTemplateParams : CFExTemplateParams
    {
        public CFExTextTemplateParams()
        {
            
        }

        public CFExTextTemplateParams(TextTemplateParamsType type)
        {
            this.ctp = type;
        }
        private TextTemplateParamsType ctp;

        public override void Read(BinaryReader reader)
        {
            this.ctp = (TextTemplateParamsType) reader.ReadUInt16();
            var reserved = reader.ReadBytes(14);
        }
        public TextTemplateParamsType TextRuleType { get { return ctp; } }

        public override void Write(BinaryWriter writer)
        {
            writer.Write((ushort)ctp);
            writer.Write(new byte [14]);
        }

        public override byte Type
        {
            get { return 0x08; }
        }

        public override byte Length
        {
            get { return 16; }
        }
    }
}